﻿namespace Framework.Core
{
    public static class StringExtension
    {
        public static string SafeToString(this object o)
        {
            return o != null ? o.ToString() : string.Empty;
        }

        public static string SafeTrim(this string s)
        {
            if(string.IsNullOrWhiteSpace(s))
            {
                return string.Empty;
            }

            return s.Trim();
        }
    }
}
